import { createRouter, createWebHashHistory } from 'vue-router'
// import Home from '@/components/home/Home'
// import Passage from '@/components/passage/Passage'
// import PassageList from '@/components/passage/PassageList'
// import Club from '@/components/club/Club'
// import ClubList from '@/components/club/ClubList'
// import Activity from '@/components/activity/Activity'
// import ActivityList from '@/components/activity/ActivityList'
// import File from '@/components/file/File'
// import FileList from '@/components/file/FileList'
import LoginRegister from '../views/LoginRegister.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/components/home/Home.vue')
  },
  {
    name: 'Passage',
    path: '/passages/:id/detail.html',
    component: () => import('@/components/passage/Passage.vue')
  },
  {
    name: 'PassageList',
    path: '/passages',
    component: () => import('@/components/passage/PassageList.vue')
  },
  {
    name: 'Club',
    path: '/clubs/:num',
    component: () => import('@/components/club/Club.vue')
  },
  {
    name: 'ClubList',
    path: '/clubs',
    component: () => import('@/components/club/ClubList.vue')
  },
  {
    path: '/activities/:id/detail.html',
    name: 'Activity',
    component: () => import('@/components/activity/Activity.vue')
  },
  {
    name: 'ActivityList',
    path: '/activities',
    component: () => import('@/components/activity/ActivityList.vue')
  },
  {
    name: 'File',
    path: '/files/:id/detail.html',
    component: () => import('@/components/file/File.vue')
  },
  {
    name: 'FileList',
    path: '/files',
    component: () => import('@/components/file/FileList.vue')
  },
  {
    path: '/login',
    name: 'LoginRegister',
    component: LoginRegister
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/'
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
